package com.sofwin.util;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @packageName: com.sofwin.util
 * @user: andyliu
 * @date: 2022/12/15 11:12
 * @email 115176513@qq.com
 * @description: TODO
 */

public class DateUtil {

    /**
     * 格式化日期
     * @param date
     * @param pattern
     * @return
     */
    public static String getDate(Date date, String pattern){
        SimpleDateFormat sdf = new SimpleDateFormat(pattern);
        return sdf.format(date);
    }
}
